{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Populating the interactive namespace from numpy and matplotlib\n"
     ]
    }
   ],
   "source": [
    "%pylab inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import xarray as xr\n",
    "import matplotlib.pyplot as plt\n",
    "import datetime as dt\n",
    "import pandas as pd\n",
    "import os\n",
    "import re"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "def get_data(fili,varName):\n",
    "    ds = xr.open_dataset(fili)\n",
    "    da = ds[varName]\n",
    "    da = da.rename({'ncl0': 'time'})\n",
    "    if varName == 'cfsr2':\n",
    "        da['time'] = pd.date_range('2012-01-01', periods=da.shape[0], freq='AS')\n",
    "    else:\n",
    "        da['time'] = pd.date_range('1981-01-01', periods=da.shape[0], freq='AS')\n",
    "    return da\n",
    "\n",
    "def shift_time(da):\n",
    "\tdate = pd.to_datetime( da.coords['time'].data )\n",
    "\tda.coords['time'] = [dt.datetime( (d.year - 1), d.month, d.day ) for d in date]\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "diri = r'C:\\Users\\apbarret\\Documents\\data\\SnowOnSeaIce'\n",
    "\n",
    "freq_fili = {'cfsr': 'cfsr_arctic_mean_wetday_frequency.nc',\n",
    "             'erai': 'era_interim_arctic_mean_wetday_frequency.nc',\n",
    "             'merra2': 'merra2_arctic_mean_wetday_frequency.nc',\n",
    "             'cfsr2': 'cfsr2_arctic_mean_wetday_frequency.nc',\n",
    "             'merra': 'merra_arctic_mean_wetday_frequency.nc',\n",
    "             'jra55': 'jra55_arctic_mean_wetday_frequency.nc'}\n",
    "\n",
    "mean_fili = {'cfsr': 'cfsr_arctic_mean_wetday_mean.nc',\n",
    "             'erai': 'era_interim_arctic_mean_wetday_mean.nc',\n",
    "             'merra2': 'merra2_arctic_mean_wetday_mean.nc',\n",
    "             'cfsr2': 'cfsr2_arctic_mean_wetday_mean.nc',\n",
    "             'merra': 'merra_arctic_mean_wetday_mean.nc',\n",
    "             'jra55': 'jra55_arctic_mean_wetday_mean.nc'}\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "def import_data(fileList):\n",
    "    \n",
    "    result = {}\n",
    "    for key in freq_fili.keys():\n",
    "        data = get_data(os.path.join(diri, fileList[key]), key)\n",
    "        if (key == 'merra2') | (key == 'jra55'):\n",
    "            shift_time(data)\n",
    "        result[key] = np.asscalar( data.sel(time=slice('1981-01-01','2010-01-01')).mean().data )\n",
    "        \n",
    "    return result"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'cfsr': 0.3144259853041733,\n",
       " 'cfsr2': nan,\n",
       " 'erai': 0.22444148921988188,\n",
       " 'jra55': 0.2456644235638391,\n",
       " 'merra': 0.19550630865679378,\n",
       " 'merra2': 0.26705490974028473}"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "freq = import_data(freq_fili)\n",
    "freq"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "ave = import_data(mean_fili)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[2.6525215536275897,\n",
       " 2.55404073365425,\n",
       " 2.5515788462048627,\n",
       " 2.672723250876546,\n",
       " nan,\n",
       " 2.7378935506024935]"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ave.values()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Frequency</th>\n",
       "      <th>Mean</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>cfsr</th>\n",
       "      <td>0.314426</td>\n",
       "      <td>2.652522</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>merra</th>\n",
       "      <td>0.195506</td>\n",
       "      <td>2.554041</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>erai</th>\n",
       "      <td>0.224441</td>\n",
       "      <td>2.551579</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>merra2</th>\n",
       "      <td>0.267055</td>\n",
       "      <td>2.672723</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>cfsr2</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>jra55</th>\n",
       "      <td>0.245664</td>\n",
       "      <td>2.737894</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        Frequency      Mean\n",
       "cfsr     0.314426  2.652522\n",
       "merra    0.195506  2.554041\n",
       "erai     0.224441  2.551579\n",
       "merra2   0.267055  2.672723\n",
       "cfsr2         NaN       NaN\n",
       "jra55    0.245664  2.737894"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x = pd.DataFrame({'Frequency': freq.values(), 'Mean': ave.values()}, index=freq.keys() )\n",
    "x"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "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CbDP3Zeb2V5gWg291UDS7TMiNcjMJhIJqCdqaX+dgE+AH7l7UW3sszHSobFIA2VmNwFL\ngPEKweOjEaGIBJ5GhCISeApCEQk8BaGIBJ6CUEQCT0EoIoGnIBSRwFMQikjgKQhFJPAUhCISeApC\nEQk8BaGIBJ6CUEQCT0EoIoGnIBSRwFMQikjgKQhFJPAUhCISeApCEQk8BaGIBJ6CUEQC7/8Dg1HV\nD8RXWOUAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xeae8470>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "ax = x.plot('Frequency', 'Mean', kind='scatter', s=50)\n",
    "for k, v in x.iterrows():\n",
    "    ax.annotate(k, v,\n",
    "                xytext=(10,-5), textcoords='offset points',\n",
    "                family='sans-serif', fontsize=18, color='darkslategrey')\n",
    "\n",
    "ax.set_aspect(1.)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
